home *** CD-ROM | disk | FTP | other *** search
/ APDL Eductation Resources / APDL Eductation Resources.iso / programs / database / powerbase / docs / Impulse < prev    next >
Encoding:
Text File  |  1997-02-21  |  5.1 KB  |  123 lines

  1.            APPENDIX A − POWERBASE AS AN IMPULSE SERVER
  2.            ===========================================
  3. The following is a description of the Impulse “methods” understood by
  4. Powerbase, given in the standard format recommended by Computer Concepts.
  5. Users wishing to write their own Impulse tasks to communicate with Powerbase
  6. will need this information. They will also need details of the SWIs to which
  7. Impulse will respond, and this information is obtainable from Computer
  8. Concepts.
  9.  
  10. {methods:       GetPathname
  11.                 Selection <string>
  12.                 ParseQuery <string>
  13.                 GetField <tag>
  14.                 GetRecord
  15.                 PutFile
  16.                 ExpandCode <string>
  17.                 GetExpanded <string>
  18.                 NextMatch
  19.  
  20. Description:
  21. ============
  22. GetPathname
  23. -----------
  24. Specifies an “object” i.e. a Powerbase database. If Powerbase has the
  25. required database open it replies with the full pathname of the object,
  26. otherwise it returns an error message. Example of use:−
  27.  
  28. :Powerbase !Elements GetPathname  (returns pathname of !Elements)
  29.  
  30. R6 points to pathname when calling task is decoding reply.
  31.  
  32. Selection <string>
  33. ------------------
  34. Tells Powerbase about a field, or group of fields, in which the caller is
  35. interested. The fields are specified as a list of tags, separated by any
  36. suitable character (e.g. “/” or “,”). The same separator must appear at the
  37. very end of the tag-list.  Powerbase replies with the maximum data-length of
  38. the combined fields in the selection. Example of use:−
  39.  
  40.   :Powerbase Selection NAME/SYM/Z/
  41.  
  42. R6 points to a string which gives data-length.
  43.  
  44. ParseQuery <string>
  45. -------------------
  46. Informs Powerbase of the criteria to be used in selecting records to
  47. transmit to the caller.  The parameter is a standard Powerbase search
  48. formula and Powerbase replies with the title which would normally appear at
  49. the head of one of its printed lists. Example of use:−
  50.  
  51. :Powerbase ParseQuery GP=T
  52.  
  53. R6 points to returned title.
  54.  
  55. GetField <tag>
  56. --------------
  57. Requests from Powerbase the data in the specified field of the next record
  58. which matches the preceding ParseQuery command.  When Powerbase replies to
  59. the GetField command the calling task should respond with an
  60. Impulse_FetchData, specifying the address and length of the buffer to be
  61. used, and then wait for an Impulse_receive event (reason code &204) before
  62. reading the buffer.  Example of use:−
  63.  
  64. :Powerbase GetField NAME
  65.  
  66. GetRecord [<key>]
  67. -----------------
  68. (The square brackets signify that the key is optional: they are not part of
  69. the command.) Sent without a key it requests from Powerbase the next record
  70. which matches the preceding ParseQuery command. If the primary key of a
  71. record in the database is appended then Powerbase will return the record
  72. corresponding to that key. The key must be separated from the GetRecord by a
  73. space. The calling task must follow the procedure described above for
  74. GetField.  Powerbase will transmit the fields specified in the Selection
  75. command, using the same separator as was used in that command. Receipt of
  76. data may be followed by another GetRecord command, returning the next
  77. matching record and so on, a zero-length response signifying that there are
  78. no more matching records. If using keys to request specific records you
  79. should end by sending *** as a key to tell Powerbase that the dialogue is
  80. finished.  This command and the one below operate only on Subfile 0 of the
  81. Powerbase database. Example of use:−
  82.  
  83. :Powerbase GetRecord ACTI
  84.  
  85. PutRecord
  86. ---------
  87. Informs Powerbase that the caller wishes to write a record to the current
  88. Powerbase database. It should be sent as message type &200. A Selection
  89. command should have been previously sent to tell Powerbase what fields to
  90. expect and what separator is to be used. Powerbase will then reply with a
  91. GetRecord command (reason code &201) which the caller should acknowledge
  92. with message type &202, specifying the maximum length of the data which will
  93. be sent. Wait for event &203 which is a request by Powerbase for the caller
  94. to transmit the data. The caller should then do so with
  95. Impulse_TransmitData, specifying the buffer address and the length of data
  96. being sent. This may be immediately followed by  another PutRecord.
  97.  
  98. ExpandCode <string>
  99. -------------------
  100. Requests the expanded form of a code used in a field linked to a validation
  101. table. The parameter string consists of the code itself, then a space, then
  102. the name of the validation table with the column number appended. Example of
  103. use:−
  104.  
  105. :Powerbase ExpandCode T Group0
  106.  
  107. GetExpanded <string>
  108. --------------------
  109. Combines the functions of GetField and ExpandCode, i.e. it requests the
  110. expanded form of the contents of a specified field. The parameter string is
  111. similar to that for ExpandCode, except that the field tag is substituted for
  112. the code. Example of use:−
  113.  
  114. :Powerbase GetExpanded GP Group0
  115.  
  116. NextMatch
  117. ---------
  118. Is designed to remove the restriction whereby only the data from a single
  119. record can be merged into a given document.  All it does is tell Powerbase
  120. to access the next record matching the search formula in the Merge window
  121. and interpret subsequent Merge commands by taking data from that record.
  122.  
  123. }